package com.tengchao.books.model;

import java.io.Serializable;

import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;

@SuppressWarnings("serial")
@Table
public class Book implements Serializable{
	
	@PrimaryKey
	private int bookid;
	
	private String author;
	
	private int price;

	public int getBookid() {
		return bookid;
	}

	public void setBookid(int bookid) {
		this.bookid = bookid;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getName());
		sb.append(" {\n\tbookid: ");
		sb.append(bookid);
		sb.append("\n\tauthor: ");
		sb.append(author);
		sb.append("\n\tprice: ");
		sb.append(price);
		sb.append("\n}");
		return sb.toString();
	}
	
	
}
